home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5588 < prev    next >
Encoding:
Text File  |  1996-08-05  |  3.3 KB  |  80 lines

  1. Path: sun001.spd.dsccc.com!spd!jmccarty
  2. From: jmccarty@spd.dsccc.com (Mike McCarty)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: What to do when feof() is NOT feof()
  5. Date: 20 Feb 1996 01:23:47 GMT
  6. Organization: DSC Communications Corporation, Plano, Texas USA
  7. Message-ID: <4gb7r3$p4k@sun001.spd.dsccc.com>
  8. References: <4g7rsj$fnf@spectator.cris.com> <1996Feb19.063026.29889@zcon.com>
  9. NNTP-Posting-Host: aplo139.spd.dsccc.com
  10.  
  11. In article <1996Feb19.063026.29889@zcon.com>,
  12. Syed Zaeem Hosain <szh@zcon.com> wrote:
  13.  
  14. )I would have to differ. Dan has always offered *correct* advice when it
  15. )is called for. While I do not necessarily always agree with his way of
  16. )doing so, his point here is still well taken.
  17.  
  18. This is false. On more than one occasion Dan has posted incorrect
  19. information, and when challenged either just silently gone away, or
  20. responded with verbal abuse.
  21.  
  22. )When somebody is asking a question about something (that they are
  23. )obviously unknowledgable or confused about), giving them incorrect
  24. )answers only propagates the confusion. So please don't guess, please
  25. )don't offer any incorrect suggestions, please don't confuse them
  26. )further, etc.
  27.  
  28. I think that guessing can be very helpful, myself. Especially when a
  29. newbie has asked a "fuzzy" question. Then guessing things like
  30.  
  31.     I think that you are using an MSDOS machine; if so then...
  32.  
  33.         or
  34.  
  35.     assuming you meant ... then ...
  36.  
  37. can be very useful. And in any case, where does the charter of this
  38. newsgroup state that only bona fide, certified, Dan Pop-a-fied experts
  39. are allowed to post responses? This is an UNMODERATED newsgroup.
  40.  
  41. )>I may not be an expert but I know if you open a file with fopen( 
  42. )>"filename", "rt"), then fgets stops reading when it finds a ascii 26 and 
  43. )>signals end-of-file. If you open it with fopen( "filename","rb") it reads until 
  44. )>the real end-of-file. I noticed in your smart-ass reply you did not offer any 
  45. )>answers to his problem. Maybe you should take you own advice.
  46. )
  47. )On my SunOS system, there is no such ascii 26 byte denoting end of file
  48. )and fgets will *not* terminate in this manner. The point is that by
  49. )making such incorrect responses (like you did by insisting on this
  50. )point) is just plain wrong. It has nothing to do with the language or
  51. )how the end of files are denoted in most operating systems. Even in
  52. )PC's running MSDOS, there is no such requirement that there *must* be
  53. )an ascii 26 at the end of text files. Certain editors (Brief is an
  54. )example. microEMacs is another) can easily be configured to create such
  55. )ascii files without this byte.
  56.  
  57. His response is not incorrect. It is just incomplete. There is a
  58. difference. But calling someone an idiot is incorrect.
  59.  
  60. )Note that even the EOF result returned (look in stdio.h) has nothing to
  61. )do with the actual byte at the end of the file.
  62.  
  63. Yes, it does, on some systems. This is a very strong statement for you
  64. to make, especially in light of the next statement.
  65.  
  66. )The bottom line still is: please do not offer answers if you do not
  67. )know the correct answer.
  68.  
  69. Ah, I see. Do as I say, not as I do. Since you offered answers here
  70. which are not correct.
  71.  
  72. It would be a lot calmer and more fun to read this group if people could
  73. treat each other with a normal dose of courtesy.
  74.  
  75. Mike
  76. ----
  77. char *p="char *p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
  78.  
  79. I don't speak for DSC.         <- They make me say that.
  80.